<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta content="white" name="apple-mobile-web-app-status-bar-style" />
    <title>NASTool</title>
    <link rel="shortcut icon" href="../static/favicon.ico" type="image/x-icon" />
    <link rel="apple-touch-icon" href="../static/img/logo.png">
    <link rel="icon" href="apple-touch-icon.png">
    <!-- CSS files -->
    <link href="../static/css/tabler.min.css" rel="stylesheet"/>
    <link href="../static/css/tagsinput.css" rel="stylesheet"/>
    <style type="text/css" media="screen">
		#editor {
			width:100%;
			height:500px;
		}
	</style>
  </head>
  <body  class="layout-boxed">
    <div class="page">
      <header class="navbar navbar-expand-md navbar-light d-print-none">
        <div class="container-xl">
          <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-menu">
            <span class="navbar-toggler-icon"></span>
          </button>
          <h1 class="navbar-brand navbar-brand-autodark d-none-navbar-horizontal pe-0 pe-md-3">
            <a href="/">
              <img src="../static/img/logo.svg" width="110" height="32" alt="NASTool" class="navbar-brand-image">
            </a>
          </h1>
          <div class="navbar-nav flex-row order-md-last">
            <div class="nav-item d-none d-md-flex me-3">
              <div class="btn-list">
                <a href="https://github.com/jxxghp/nas-tools" class="btn" target="_blank" rel="noreferrer">
                  <!-- Download SVG icon from http://tabler-icons.io/i/brand-github -->
                  <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /></svg>
                  Source code
                </a>
              </div>
            </div>
            <div class="d-none d-md-flex">
              <a href="?theme=dark" class="nav-link px-0 hide-theme-dark" title="暗黑风格" data-bs-toggle="tooltip" data-bs-placement="bottom">
                <!-- Download SVG icon from http://tabler-icons.io/i/moon -->
                <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" /></svg>
              </a>
              <a href="?theme=light" class="nav-link px-0 hide-theme-light" title="明亮风格" data-bs-toggle="tooltip" data-bs-placement="bottom">
                <!-- Download SVG icon from http://tabler-icons.io/i/sun -->
                <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><circle cx="12" cy="12" r="4" /><path d="M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7" /></svg>
              </a>
              <div class="nav-item dropdown d-none d-md-flex me-3">
                <a href="#" class="nav-link px-0" data-bs-toggle="dropdown" tabindex="-1" aria-label="新版本提示" id="new_version_tip" style="display: none">
                  <!-- Download SVG icon from http://tabler-icons.io/i/bell -->
                  <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 5a2 2 0 0 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6" /><path d="M9 17v1a3 3 0 0 0 6 0v-1" /></svg>
                  <span class="badge bg-red"></span>
                </a>
                <div class="dropdown-menu dropdown-menu-arrow dropdown-menu-end dropdown-menu-card">
                  <div class="card">
                    <div class="card-header">
                      <h3 class="card-title">最新版本</h3>
                    </div>
                    <div class="list-group list-group-flush list-group-hoverable">
                      <div class="list-group-item">
                        <div class="row align-items-center">
                          <div class="col-auto"><span class="status-dot status-dot-animated bg-red d-block"></span></div>
                          <div class="col text-truncate">
                            <div class="d-block text-muted text-truncate mt-n1" id="new_version_info">
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="collapse navbar-collapse" id="navbar-menu">
            <div class="d-flex flex-column flex-md-row flex-fill align-items-stretch align-items-md-center">
              <ul class="navbar-nav">
                <li class="nav-item active" id="nav_index">
                  <a class="nav-link" href="javascript:navmenu('index')" >
                    <span class="nav-link-icon d-md-none d-lg-inline-block"><!-- Download SVG icon from http://tabler-icons.io/i/home -->
                      <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><polyline points="5 12 3 12 12 3 21 12 19 12" /><path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7" /><path d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6" /></svg>
                    </span>
                    <span class="nav-link-title">
                      开始
                    </span>
                  </a>
                </li>
                <li class="nav-item" id="nav_search">
                  <a class="nav-link" href="javascript:navmenu('search')">
                    <span class="nav-link-icon d-md-none d-lg-inline-block"><!-- Download SVG icon from http://tabler-icons.io/i/package -->
                      <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><polyline points="12 3 20 7.5 20 16.5 12 21 4 16.5 4 7.5 12 3" /><line x1="12" y1="12" x2="20" y2="7.5" /><line x1="12" y1="12" x2="12" y2="21" /><line x1="12" y1="12" x2="4" y2="7.5" /><line x1="16" y1="5.25" x2="8" y2="9.75" /></svg>
                    </span>
                    <span class="nav-link-title">
                      影视搜索
                    </span>
                  </a>
                </li>
                <li class="nav-item" id="nav_sites">
                  <a class="nav-link" href="javascript:navmenu('sites')">
                    <span class="nav-link-icon d-md-none d-lg-inline-block"><!-- Download SVG icon from http://tabler-icons.io/i/checkbox -->
                      <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><polyline points="9 11 12 14 20 6" /><path d="M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9" /></svg>
                    </span>
                    <span class="nav-link-title">
                      站点订阅
                    </span>
                  </a>
                </li>
                <li class="nav-item dropdown" id="nav_recommend">
                  <a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown" data-bs-auto-close="inside" role="button" aria-expanded="false" >
                    <span class="nav-link-icon d-md-none d-lg-inline-block"><!-- Download SVG icon from http://tabler-icons.io/i/star -->
                      <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z" /></svg>
                    </span>
                    <span class="nav-link-title">
                      推荐
                    </span>
                  </a>
                  <div class="dropdown-menu">
                    <a class="dropdown-item" href="javascript:navmenu('recommend?t=hm')">
                      TMDB热门电影
                    </a>
                    <a class="dropdown-item" href="javascript:navmenu('recommend?t=ht')">
                      TMDB热门电视剧
                    </a>
                    <a class="dropdown-item" href="javascript:navmenu('recommend?t=nm')">
                      TMDB最新电影
                    </a>
                    <a class="dropdown-item" href="javascript:navmenu('recommend?t=nt')">
                      TMDB最新电视剧
                    </a>
                    <a class="dropdown-item" href="javascript:navmenu('recommend?t=dbom')">
                      正在热映
                      <span class="badge badge-sm bg-orange text-case ms-2">HOT</span>
                    </a>
                    <a class="dropdown-item" href="javascript:navmenu('recommend?t=dbhm')">
                      豆瓣热门电影
                    </a>
                    <a class="dropdown-item" href="javascript:navmenu('recommend?t=dbht')">
                      豆瓣热门电视剧
                    </a>
                    <a class="dropdown-item" href="javascript:navmenu('recommend?t=dbnm')">
                      豆瓣最新电影
                    </a>
                    <a class="dropdown-item" href="javascript:navmenu('recommend?t=dbnt')">
                      豆瓣最新电视剧
                    </a>
                  </div>
                </li>
                <li class="nav-item" id="nav_download">
                  <a class="nav-link" href="javascript:navmenu('download')">
                    <span class="nav-link-icon d-md-none d-lg-inline-block"><!-- Download SVG icon from http://tabler-icons.io/i/layout-2 -->
                    <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-download" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
                       <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
                       <path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"></path>
                       <polyline points="7 11 12 16 17 11"></polyline>
                       <line x1="12" y1="4" x2="12" y2="16"></line>
                    </svg>
                    </span>
                    <span class="nav-link-title">
                      下载
                    </span>
                  </a>
                </li>
				<li class="nav-item" id="nav_service">
                  <a class="nav-link" href="javascript:navmenu('service')">
                    <span class="nav-link-icon d-md-none d-lg-inline-block"><!-- Download SVG icon from http://tabler-icons.io/i/layout-2 -->
                      <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><rect x="4" y="4" width="6" height="5" rx="2" /><rect x="4" y="13" width="6" height="7" rx="2" /><rect x="14" y="4" width="6" height="7" rx="2" /><rect x="14" y="15" width="6" height="5" rx="2" /></svg>
                    </span>
                    <span class="nav-link-title">
                      服务
                    </span>
                  </a>
                </li>
                <li class="nav-item" id="nav_history">
                  <a class="nav-link" href="javascript:navmenu('history')">
                    <span class="nav-link-icon d-md-none d-lg-inline-block"><!-- Download SVG icon from http://tabler-icons.io/i/layout-2 -->
                      <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-history" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
                         <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
                         <polyline points="12 8 12 12 14 14"></polyline>
                         <path d="M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5"></path>
                      </svg>
                    </span>
                    <span class="nav-link-title">
                      历史
                    </span>
                  </a>
                </li>
              </ul>
            </div>
        </div>
        </div>
      </header>
      <div class="page-wrapper">
        <div id="page_content"></div>
        <footer class="footer footer-transparent d-print-none">
          <div class="container-xl">
            <div class="row text-center align-items-center flex-row-reverse">
              <div class="col-12 col-lg-auto mt-3 mt-lg-0">
                <ul class="list-inline list-inline-dots mb-0">
                  <li class="list-inline-item">
                    Copyright &copy; 2022
                    <a href="." class="link-secondary">NASTool</a>.
                    All rights reserved.
                  </li>
                  <li class="list-inline-item">
                    {{ AppVersion }}
                  </li>
                </ul>
              </div>
            </div>
          </div>
        </footer>
        <div class="modal fade" id="modal-wait" tabindex="-1" role="dialog" aria-hidden="true">
          <div class="modal-dialog modal-full-width modal-dialog-centered" role="document">
            <div class="spinner-border text-primary m-auto"></div>
          </div>
        </div>
      </div>
    </div>
    <!-- Libs JS -->
    <!-- Tabler Core -->
    <script src="../static/js/jquery-3.3.1.min.js"></script>
    <script src="../static/js/tabler.min.js"></script>
    <script src="../static/js/demo.min.js"></script>
    <script src="../static/js/util.js"></script>
    <script type="text/javascript">
      // 检查新版本
      AppVersion = "{{ AppVersion }}"
      function check_new_version(){
          ajax_post("version", {}, function(ret){
            if(ret.code == 0){
              if(ret.version != AppVersion){
                  $("#new_version_tip").show();
                  $("#new_version_info").html(ret.info);
              }else{
                  $("#new_version_tip").hide();
              }
            }
          });
      }
      //关闭加载框
      function hide_process(){
        $("#modal-wait").modal("hide");
      }
      //导航点击
      function navmenu(page){
        nid = page.split("?")[0];
        $("li[class*='nav-item']").removeClass("active")
        $("#nav_"+nid).addClass("active");
        $("#navbar-menu").collapse('hide')
        $("#modal-wait").modal("show");
        $("#page_content").load(page, {}, function(response,status,xhr){
          setTimeout("hide_process()", 500);
        });
      }
      $(document).ready(function(){
        //加载页面
        go_page = "{{ GoPage }}";
        if(go_page){
          navmenu(go_page);
        }else{
          navmenu("index");
        }
        //检查版本升级
        check_new_version();
      });
    </script>
  </body>
</html>